<?php
/**
 * @package      OWNServices
 * @subpackage   site
 *
 * @author       Sanawin Tinsuwan
 * @copyright    Copyright (C) 20014 Sanawin Tinsuwan. All rights reserved.
 * @license      http://www.gnu.org/licenses/gpl.html GNU/GPL, see LICENSE.txt
 */

defined('_JEXEC') or die();

// Load the form filters
$filters = $this->filterForm->getGroup('filter');
?>
<div class="row">
    <div class="col-xs-12">
		<div class="box">
			
			<div class="box-header">
				<h3 class="box-title"><?php echo JText::_('COM_OWNSERVICES_TRANSACTIONS'); ?></h3>

				<div class="box-tools pull-right">
					<button class="btn btn-success">
						<i class="fa fa-fw fa-arrow-circle-right"></i> <?php echo JText::_('COM_OWNSERVICE_REQUEST_APPROVAL'); ?>
					</button>
				</div>
			</div><!-- /.box-header -->

			<div class="box-body table-responsive">
				<form name="adminForm" id="adminForm" action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post">
					<div class="row">
						<div class="col-xs-6">
							<div id="example1_length" class="dataTables_length">
								<label><?php echo $this->pagination->getLimitBox(); ?> records per page</label>
							</div>
						</div>
						<div class="col-xs-6">
							<div class="dataTables_filter" id="example1_filter">
								<?php if ($filters) : ?>
									<?php foreach ($filters as $fieldName => $field) : ?>
											<?php echo $field->input; ?>
									<?php endforeach; ?>
								<?php endif; ?>
								<label>Search: <input type="text" aria-controls="example1"></label>
							</div>
						</div>
					</div>
					<table id="example1" class="table table-bordered table-striped">
						<thead>
							<tr>
								<th><?php echo JHtml::_('grid.checkall'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_RECEIVER_NO'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_ACCOUNT_NO'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_MEMBER'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_BANK_NAME'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_BRANCH_CITY'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_CREATE_DATE'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_TRANSFER_AMOUNT'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_RATE'); ?></th>
								<th><?php echo JText::_('COM_OWNSERVICES_TOTAL_RECEIVABLE'); ?></th>
							</tr>
						</thead>
						<tbody>
							<?php foreach($this->items as $i => $item): ?>
							<tr>
								<td><?php echo JHtml::_('grid.id', $i, $item->id); ?></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
								<td></td>
							</tr>
							<?php endforeach; ?>
						</tbody>
						<tfoot>
							<tr>
								<th></th>
								<th></th>
								<th></th>
								<th></th>
								<th></th>
								<th></th>
								<th><?php echo JText::_('COM_OWNSERVICES_TOTAL'); ?></th>
								<th>0.00 AUD</th>
								<th></th>
								<th>0.00 THB</th>
							</tr>
						</tfoot>
					</table>
					<?php if ($this->pagination->get('pages.total') > 1) : ?>
					<div class="row">
						<div class="col-xs-6">
							<div class="dataTables_info" id="example1_info"><?php echo $this->pagination->getPagesCounter(); ?></div>
						</div>
						<div class="col-xs-6">
							<div class="dataTables_paginate paging_bootstrap">
									<?php echo $this->pagination->getPagesLinks(); ?>
							</div>
						</div>
					</div>
					<?php endif; ?>
					<input type="hidden" name="task" value="" />
					<input type="hidden" name="boxchecked" value="0" />
					<?php echo JHtml::_('form.token'); ?>
				</form>
			</div><!-- /.box-body -->
		</div><!-- /.box -->
	</div>
</div>
<script src="<?php echo JUri::base(true).'/media/com_ownservices/js/plugins/datatables/jquery.dataTables.js'; ?>" type="text/javascript"></script>
<script src="<?php echo JUri::base(true).'/media/com_ownservices/js/plugins/datatables/dataTables.bootstrap.js'; ?>" type="text/javascript"></script>

<!-- AdminLTE App -->
<script src="<?php echo JUri::base(true).'/media/com_ownservices/js/AdminLTE/app.js'; ?>" type="text/javascript"></script>
